package com.fan.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {

    /**自身属性**/
    private Integer comment_id;  // 评论id
    private String content;     // 评论内容
    private Integer from_id;
    private Integer status;    // 1 为正常 0 为删除
    private Date time;
    private int like; // 点赞量

    /**实体关系**/
    private Integer article_id;  // blog本身
    private Integer father_id;  // 父评论的id
    private String father_name; // 父评论name
    private String father_content; // 父评论内容
    private Integer root_id;    // 根评论的id
    private List<Comment> child;   // 评论下的子评论
    private int isYouLike;

    /**连接查询**/
    private String img;
    private String from_name; // 发起人名字
    private String position; // 职位


    @Override
    public String toString() {
        return "Comment{" +
                "comment_id=" + comment_id +
                ", content='" + content + '\'' +
                ", from_id=" + from_id +
                ", status=" + status +
                ", time='" + time + '\'' +
                ", article_id=" + article_id +
                ", father_id=" + father_id +
                ", father_content='" + father_content + '\'' +
                ", root_id=" + root_id +
                ", child=" + child +
                ", img='" + img + '\'' +
                ", from_name='" + from_name + '\'' +
                ", position='" + position + '\'' +
                '}';
    }

}
